from elasticsearch import Elasticsearch

class ESHelper():
    def __init__(self,db,ip='192.168.101.240',port=9200,uid='',pwd=''):
        #self.db = Elasticsearch([ip],http_auth=('elastic', 'password'),port=9200)
        self.db = Elasticsearch([ip],port=port)
        
    def excute(self,tbl,query):
        pass

    def insert(self,tbl,data):
        pass

    def delete(self,index):
        self.db.indices.delete(index=index, ignore=[400, 404])


